package com.wholesale.utils;

import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;

import com.wholesale.R;

public class FavoriteCache {
	private View baseView;
	private TextView goodsName;
	private ImageView goodsImage;
	private ImageView isNew;
	private ImageView isPromote;
	private TextView goodsPrice;
	private Button deteleButton;

	public FavoriteCache(View baseView) {
		this.baseView = baseView;
	}

	public TextView getGoodsName() {
		if (goodsName == null) {
			goodsName = (TextView) baseView.findViewById(R.id.goodsName);
		}
		return goodsName;
	}

	public TextView getGoodsPrice() {
		if (goodsPrice == null) {
			goodsPrice = (TextView) baseView.findViewById(R.id.goodsPrice);
		}
		return goodsPrice;
	}

	public ImageView getGoodsImage() {
		if (goodsImage == null) {
			goodsImage = (ImageView) baseView.findViewById(R.id.goodsImage);
		}
		return goodsImage;
	}

	public ImageView getNewImage() {
		if (isNew == null) {
			isNew = (ImageView) baseView.findViewById(R.id.isNew);
		}
		return isNew;
	}

	public ImageView getPromoteImage() {
		if (isPromote == null) {
			isPromote = (ImageView) baseView.findViewById(R.id.isPromote);
		}
		return isPromote;
	}

	public Button getDeteleButton() {
		if (deteleButton == null) {
			deteleButton = (Button) baseView.findViewById(R.id.deteleBtn);
		}
		return deteleButton;
	}
}
